package com.threadmethod.productdata;

/**
 * @PackageName:com.threadmethod.productdata
 * @ClassName:ProducerThread
 * @Description: 定义线程类模拟消费者
 * @Author: zhangxiaoyu
 * @date 2021/1/18 14:04
 */
public class ConsumerThread extends Thread{

      //消费者使用数据，就是调用value字段值
      private ValueOP obj;

    public ConsumerThread(ValueOP obj) {
        this.obj = obj;
    }

    @Override
    public void run() {
        while (true){
            obj.getValue();
        }
    }
}
